/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dbhandler;

import evthandler.EventMessage;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author Casper, Dennis, Jackie, Jakob
 * @version 1.00
 */
public class Style{

    private int styleNo;
    private String styleName;

    /**
     *
     * @param styleNo The Primary Key
     */
    public Style(int styleNo) {
        this.styleNo = styleNo;
        try {
            ResultSet rs = DbCon.getInstance().executeQuery("SELECT styleName FROM style WHERE styleNo=" + styleNo);
            while (rs.next()) {
                styleName = rs.getString("styleName");
            }
        } catch (SQLException ex) {
            new EventMessage("SQL error in Style", "There was an error performing the sql inquery\n").showException(ex);
        }
    }
}
